﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects
{
    public class RestaurantMenuCategory : BusinessObject
    {
        public RestaurantMenuCategory()
        {
            AddRule(new ValidateRequired("MenuCategoryCode"));
            AddRule(new ValidateLength("MenuCategoryCode", 0, 20));

            AddRule(new ValidateRequired("MenuCategoryName"));
            AddRule(new ValidateLength("MenuCategoryName", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));
        }

        public RestaurantMenuCategory(string menuCategoryId, string menuCategoryCode, bool isParent, string parentId, string menuCategoryName,
                                        string description, bool isActive, string restaurantId)
            : this()
        {
            MenuCategoryID = menuCategoryId;
            MenuCategoryCode = menuCategoryCode;
            IsParent = isParent;
            ParentID = parentId;
            MenuCategoryName = menuCategoryName;
            Description = description;
            IsActive = isActive;
            RestaurantID = restaurantId;
        }

        public string MenuCategoryID { get; set; }

        public string MenuCategoryCode { get; set; }

        public bool IsParent { get; set; }

        public string ParentID { get; set; }

        public string MenuCategoryName { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }

        public string RestaurantID { get; set; }
    }
}
